package com.power.using.mydaggerp.ui.activity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.widget.TextView;

import com.orhanobut.logger.Logger;
import com.power.using.mydaggerp.R;
import com.power.using.mydaggerp.base.activity.BaseCompatActivity;
import com.zyw.horrarndoo.sdk.utils.AppUtils;
import com.zyw.horrarndoo.sdk.utils.ResourcesUtils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by 聪明一只哈 on 2019/10/14.
 * Time: 2019/10/14  8:50
 */
public class AboutActivity extends BaseCompatActivity {
    @BindView(R.id.tv_version_code)
    TextView tvVersionCode;
    @BindView(R.id.toolbar)
    Toolbar toolbar;

    @Override
    protected void initView(Bundle savedInstanceState) {

        initTitleBar(toolbar, "关于");
        toolbar.setTitleTextColor(ResourcesUtils.getColor(R.color.md_white));
        Logger.e("tvVersionCode = " + tvVersionCode);
        tvVersionCode.setText(AppUtils.getAppVersionName(this));

    }

    @Override
    protected int getLayoutId() {
        return R.layout.activity_about;
    }



    @OnClick(R.id.cv_author)
    public void onViewClicked() {
        Intent intent = new Intent();
        intent.setData(Uri.parse("https://github.com/Horrarndoo"));
        intent.setAction(Intent.ACTION_VIEW);
        startActivity(intent); //启动浏览器
    }
}
